package com.centaline.androidsalesblog.rx.map;

import android.support.annotation.NonNull;

import com.baidu.location.BDLocation;
import com.baidu.location.LocationClient;

import rx.Observable;

/**
 * 定位
 * Created by guilin on 16/1/7.
 */
public final class RxMap {

    private RxMap() {
        //Utility Class
    }

    /**
     * 定位
     *
     * @param locationClient LocationClient
     * @param useOnce        仅定位一次
     */
    public static Observable<BDLocation> location(@NonNull LocationClient locationClient, boolean useOnce) {
        return Observable.create(new BdLocationOnSubscribe(locationClient, useOnce));
    }

}
